package com.github.apollo;

import com.github.apollo.service.PersonService;
import com.github.apollo.service.impl.PersonServiceImpl;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author Stephen
 * @since 2018-02-07
 */
public class ApolloTestServer {

    private static final String packages = "com.github.apollo.service";

    public static void main(String[] args) {

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(packages);


        /*context.registerBean(PersonService.class, PersonServiceImpl::new);

        context.refresh();*/
        PersonService personService = context.getBean("personService", PersonService.class);

        System.out.println(personService.getPerson(22L));

    }

}
